// test.js
var inputBox = document.getElementById("inputBox")
inputBox.onchange = function(){
    var reader = new FileReader()
    reader.readAsDataURL(this.files[0])
    reader.onload = function(){
        //console.log(reader.result)
        var data = reader.result.replace(/^data:image\/png;base64,/g,"")
        $.post("http://localhost:3000/index",""+data).then(function(data){
            console.log(data)
        })
    }
}